package Time_13;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.Month;
import java.util.Calendar;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:TQ02
 * Data:2024-04-10
 * Time:13:46
 * Text：时间日期
 */
public class Test1 {
    void getTime(){
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.YEAR,2023);
        calendar.set(Calendar.MONTH,11);
        calendar.set(Calendar.DAY_OF_MONTH,31);
        System.out.println(calendar.get(Calendar.DAY_OF_WEEK));

    }
    public static void main(String[] args) {
        LocalDate date =LocalDate.of(1990, Month.DECEMBER,30);
        DayOfWeek day = date.getDayOfWeek();
        for(int i=2099;i<100000;i+=100){
            LocalDate date2 =LocalDate.of(i, Month.DECEMBER,31);
            System.out.println(date);
            DayOfWeek day2 = date2.getDayOfWeek();
            System.out.println(day);
            if(day2==day){
                System.out.println(i);
                break;
            }
        }


    }
}
